package tt.dz.appserver.service.business;

import org.apache.avro.AvroRemoteException;
import com.alibaba.fastjson.JSONObject;

import tt.dz.appserver.entity.model.ResultMappingEntity;

/**
 * app通用业务
 * 
 * @author xielf
 */
public interface PublicService {

	/**
	 * 发送验证码
	 * 
	 * @param phone
	 *            电话号码
	 *@param merchantCode
	 *            运营商            
	 * @return
	 */
	public JSONObject sendVerifyCode(String phone,String merchantCode) throws AvroRemoteException;

	/**
	 * 校验验证码
	 * 
	 * @param phone
	 * @param verifyCode
	 *            验证码
	 * @param merchantCode
	 *            运营商
	 * @param source
	 * 			   渠道
	 * @param  account
	 * 			  渠道账户           
	 * @return
	 * 
	 */
	public JSONObject validationVerifyCode(String phone, String verifyCode,String source,String merchantCode,String account,String type,String bindingType) throws AvroRemoteException;

	/**
	 * 获取最新的app版本
	 * 
	 * @param osType
	 * @return
	 */
	public ResultMappingEntity getLatestAppVersion(Integer osType);
	
	/**
	 * 获取服务点
	 * @param pageNo
	 * @return
	 */
	public ResultMappingEntity getServiceStation(int serviceType, int pageNo, float longitude, float latitude);
	
	/**
	 * 获取服务点详细
	 * @param pageNo
	 * @return
	 */
	public ResultMappingEntity getServiceStation(String serviceStationId);
	
	
	/**
	 * 获取所有banner图片
	 * @return
	 */
	public ResultMappingEntity getAllBannerList();
	
	/**
	 * 
	 * @param source 数据渠道来源
	 * @param merchantCode 运营商编码
	 * @return
	 */
	public ResultMappingEntity getAccessToken(String source, String merchantCode,String code);
	
	public ResultMappingEntity  getThirdUserinfo(String access_token, String openid,String lang);
	
	/**
	 * 获取js签名
	 * @param source 数据源
	 * @param merchantCode 运营商
	 * @param signType 签名类型
	 * @param url 签名的url
	 * @return
	 */
	public ResultMappingEntity getJsSign(String source, String merchantCode, String signType, String url);
	
	/**
	 * 
	 * @param type 获取类型
	 * @return
	 */
	public ResultMappingEntity getLables(Integer type,Integer level)throws AvroRemoteException;
	
	/**
	 * 通过坐标查询城市详情
	 * @param latitude
	 * @param longtitude
	 * @return
	 * @throws AvroRemoteException
	 */
	public ResultMappingEntity getCityNameAndCodeByCoordinate(String  longtitude,String latitude)throws AvroRemoteException;
	
	/**
	 * 获取所以运营商
	 * @return
	 * @throws AvroRemoteException
	 */
	public ResultMappingEntity getAllOperator()throws AvroRemoteException;
	

}
